import {
  __dynamicImportComponent__,
} from "simpleRouter";
import { authRoutes } from './routes/auth'
import { errorRoutes } from './routes/error'
import { useRoutes } from './routes/use'

export const routes = [
  {
    path: `/`,
    name: `home`,
    components: {
      default: __dynamicImportComponent__(`@/pages/index/index.vue`, {
        pageType: `top`,
      })
    },
    meta: {
      // 导航栏标题
      title: '%pages.home%',
      // 是否需要认证
      requiresAuth: true
    },
  },

  {
    path: `/use`,
    component: __dynamicImportComponent__(`@/pages/use/index.vue`, {
      pageType: `top`,
    }),
    meta: {
      // 导航栏标题
      title: '%pages.use%',
      // 是否需要认证
      requiresAuth: true
    },
  },
  ...useRoutes,
  ...authRoutes,
  ...errorRoutes,
]
